home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / standard / lstrwidth.z / lstrwidth
Encoding:
Text File  |  2002-10-03  |  3.8 KB  |  153 lines

  1.  
  2.  
  3.  
  4. llllssssttttrrrrwwwwiiiiddddtttthhhh((((3333GGGG))))                                                    llllssssttttrrrrwwwwiiiiddddtttthhhh((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      llllssssttttrrrrwwwwiiiiddddtttthhhh - returns the width of the specified text string
  10.  
  11. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      lllloooonnnngggg llllssssttttrrrrwwwwiiiiddddtttthhhh((((ttttyyyyppppeeee,,,,ssssttttrrrr))))
  13.      lllloooonnnngggg ttttyyyyppppeeee;;;;
  14.      vvvvooooiiiidddd ****ssssttttrrrr;;;;
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _t_y_p_e     expects one of the following symbolic constants defined in
  18.               <_g_l/_g_l._h>:
  19.  
  20.                           Each character is represented by
  21.                           a single unsigned byte.
  22.                STR_B
  23.  
  24.                           Each character is represented by
  25.                           two, consecutive unsigned bytes.
  26.                           The first byte is most
  27.                           significant.
  28.                STR_2B
  29.  
  30.  
  31.  
  32.                           Each character is represented by
  33.                           three, consecutive unsigned
  34.                           bytes.  The first byte is most
  35.                           significant.  The last byte is
  36.                           least significant.
  37.                STR_3B
  38.  
  39.  
  40.  
  41.  
  42.                           Each character is represented by
  43.                           four, consecutive unsigned bytes.
  44.                           The first byte is most
  45.                           significant.  The last byte is
  46.                           least significant.
  47.                STR_4B
  48.  
  49.  
  50.  
  51.  
  52.                           Each character is represented by
  53.                           a 16-bit unsigned integer.
  54.                STR_16
  55.  
  56.                           Each character is represented by
  57.                           a 32-bit unsigned integer.
  58.                STR_32
  59.  
  60.  
  61.  
  62.      _s_t_r      expects a pointer to the string whose width is to be computed.
  63.               The contents of the string should be consistent with respect to
  64.               the _t_y_p_e parameter.
  65.  
  66. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  67.      llllssssttttrrrrwwwwiiiiddddtttthhhh returns the width of a text string in pixels, using the
  68.      character spacing parameters of the current raster font.
  69.  
  70.      Multi-byte types (2B, 3B and 4B) are converted to character values using
  71.      the following formulas for character iiii in unsigned byte-string ssss:
  72.  
  73.        STR_2B: (s[2*i]*256) + s[2*i+1]
  74.        STR_3B: ((s[3*i]*256) + s[3*i+1])*256 + s[3*i+2]
  75.        STR_4B: (((s[4*i]*256) + s[4*i+1])*256) + s[4*i+2])*256 + s[4*i+3]
  76.  
  77.      End of string is indicated by a character value of zero.
  78.  
  79.      Undefined characters have zero width.
  80.  
  81.  
  82.  
  83.                                                                         PPPPaaaaggggeeee 1111
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90. llllssssttttrrrrwwwwiiiiddddtttthhhh((((3333GGGG))))                                                    llllssssttttrrrrwwwwiiiiddddtttthhhh((((3333GGGG))))
  91.  
  92.  
  93.  
  94. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  95.      deflfont, getlwidth, lcharstr, mapw, mapw2
  96.  
  97. NNNNOOOOTTTTEEEE
  98.      This routine is available only in immediate mode.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.                                                                         PPPPaaaaggggeeee 2222
  150.  
  151.  
  152.  
  153.